#include <bits/stdc++.h>
// 2025/03/09
// tag: 
// Author: Forever
using namespace std;

using int64 = int64_t;
#define int long long

int t, n, m, k, e[300001], o[300001], f[300001];

void solve(){
    cin >> n >> m >> k;
    f[m + 1] = 0;
    for (int i = 1; i <= m; i++) {
        int mine = 1e15, mino = 1e15;
        e[i] = o[i] = 0;
        for (int j = 1; j <= k; j++) {
            int x;
            cin >> x;
            if (x % 2 == 0)
                mine = min(mine, x), e[i] = max(e[i], x);
            else
                mino = min(mino, x), o[i] = max(o[i], x);
        }
        if (e[i] == 0)
            e[i] = -mino;
        if (o[i] == 0)
            o[i] = -mine;
    }
    for (int i = m; i >= 1; i--)
        f[i] = max(0LL, f[i + 1]) + min(e[i], o[i]);
    if (f[1] >= n){
        cout << "-1" << endl;
        return;
    }
    for (int i = 1; i <= m; i++){
        if (n - o[i] > f[i + 1] && n > o[i])
            cout << "Even", n -= o[i];
        else
            cout << "Odd", n -= e[i];
        if (i != m)
            cout << " ";
    }
    cout << endl;
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}